package models

import (
	"time"

	"gorm.io/gorm"
)

type User struct {
	ID            uint           `json:"id" gorm:"primary;size:11;comment:用户ID"`
	Username      string         `json:"username" gorm:"not null;unique;size:32;comment:用户名"`
	Password      string         `json:"password" gorm:"not null;size:128;comment:用户密码"`
	LastLoginIP   string         `json:"last_login_ip" gorm:"comment:最后一次登录IP"`
	LastLoginTime time.Time      `json:"last_login_time" gorm:"comment:最后一次登录时间"`
	CreateAt      time.Time      `json:"create_at" gorm:"autoCreateTime"`
	UpdateAt      time.Time      `json:"update_at" grom:"autoUpdateTime"`
	DeleteAt      gorm.DeletedAt `json:"-" gorm:"index"`
}
